/**
 * 版权所有 (C), 2019-2019, XXX有限公司
 * 项目名：com.company.study.designpatterns.chain
 * 文件名: Test
 * 日期: 2019/6/16 14:48
 * 说明:
 */
package com.company.study.designpatterns.chain;

/**
 * @author Anbang713
 * @create 2019/6/16
 */
public class Test {
    public static void main(String[] args) {

        UserRegisterHandler userRegisterHandler = new UserRegisterHandler();
        VipUserRegisterHandler vipUserRegisterHandler = new VipUserRegisterHandler();
        //添加处理器，形成链
        userRegisterHandler.setNextHandler(vipUserRegisterHandler);

        userRegisterHandler.handleMessage(2, "mingyu");
        userRegisterHandler.handleMessage(1, "mingyu");
    }
}